/* GZIP by Raccoon Framework */ /* main.js */ var _ = {}; _.extend = jQuery.extend; var alert_old = window.alert; /*var alert = function(message, callback) { $.blockUI({ message: "" + "
" + "

"+message+"

" + "" + "

", css: { width:290+'px', height:140+'px' } }); $("div.alert_window input.btn").click(function(){ $.unblockUI(); if (typeof callback === 'function') { callback(); } }); } */ var confirm_old = window.confirm; var confirm = function(message, callback) { $.blockUI({ message: "" + "
" + ""+message+"" + "" + "" + "
" + "
", css: { width:290+'px', height:140+'px' } }); $("div.alert_window input.ok").click(function(){ $.unblockUI(); if (typeof callback === 'function') { callback(true); } }); $("div.alert_window input.no").click(function(){ $.unblockUI(); if (typeof callback === 'function') { callback(false); } }); } var loading = function(message) { if (!message || message === "" || message === null || message === false) { message = "Procesando..."; } $.blockUI({ message: "" + "

"+message+"

" + "" }); } _.extend({ mail_regexp : /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/, alert : function(message, callback) { $.blockUI({ message: "" + "

" + "

"+message+"

" + "" + "

" }); $("div.alert_window button#btn_ok").click(function(){ $.unblockUI(); if (typeof callback === 'function') { callback(); } }); }, confirm : function(message, callback) { $.blockUI({ message: "" + "
" + "

"+message+"

" + "" + "" + "

" }); $("div.alert_window button#btn_ok").click(function(){ $.unblockUI(); if (typeof callback === 'function') { callback(true); } }); $("div.alert_window button#btn_cancel").click(function(){ $.unblockUI(); if (typeof callback === 'function') { callback(false); } }); }, loading: function(message) { if (!message || message === "" || message === null || message === false) { message = "Procesando...."; } $.blockUI({ message: "" + "

"+message+"

" + "" }); }, search: function() { var busqueda = $('#campo_buscar').val(); window.location.href = RCN.url + 'index.php/page,search/for,' + encodeURI(busqueda); }, browser: function() { // IE 6 o inferior if ($.browser.msie && $.browser.version.match(/^[0-6]/)) { window.location.href = RCN.url + '/ie'; } } }); /* users.js */ _.extend({ users: { map:null, login: function(page) { $.blockUI({ message: $('#login'), css: { width: '400px', height: '200px' } }); $('#login #login_cancel').click(function(){ $('#login #login_error_msg').html(''); $.unblockUI(); }); $('#login #login_send').click(function() { $('#login #login_error_msg').html('Procesando...'); $.post("index.php/mode,json/control,Users.validateLogin/", { email: $('input#login_email').val(), password: $('input#login_password').val() }, function(json) { if (json.status === "201") { if(page==undefined) window.location.reload(); else location.href = RCN.url+'index.php/page,'+page; } else if (json.status === "301") { $('#login #login_error_msg').html('Cuenta INACTIVA, se envió un correo con instrucciones para su activación.'); } else { $('#login #login_error_msg').html('Correo o contraseña incorrectos'); } }, "json"); }); }, logout: function() { $.post("index.php/mode,json/control,Users.logOut/", function() { location.href = RCN.url + "index.php"; }); }, addBookmark: function(id){ $.post("index.php/mode,json/control,Users.addBookmark", {id_property:id}, function(json) { if (json.status == 201) { $("#bookmark_button").attr("onclick",""); $("#bookmark_button").attr("title","Eliminar de favoritos"); $("#div_property").attr("class","detail_favorite"); $("#bookmark_button").unbind("click"); $("#bookmark_button").click(function () {_.users.delBookmark(id);}); } else alert("

Favoritos

Necesitas registrarte para poder agregar a Favoritos

¿ Olvidaste tu contraseña ?
Registrarse
"); }, "json"); }, delBookmark: function(id,this_prop){ $.post("index.php/mode,json/control,Users.delBookmark", {id_property:id}, function(json) { if (json.status == 201) { if($("#div_property").length!=0) { $("#bookmark_button").attr("onclick",""); $("#bookmark_button").attr("title","Agregar a favoritos"); $("#div_property").attr("class","detail"); $("#bookmark_button").unbind("click"); $("#bookmark_button").click(function () {_.users.addBookmark(id);}); } else history.go(0);//$(this_prop).parent().remove(); } }, "json"); }, addBookmarkList: function(id){ $.post("index.php/mode,json/control,Users.addBookmark", {id_property:id}, function(json) { if (json.status == 201) { $("#div_property"+id+" #bookmark_button").attr("onclick",""); $("#div_property"+id+" #bookmark_button").attr("title","Eliminar de favoritos"); $("#div_property"+id+" #bookmark_button").unbind("click"); $("#div_property"+id).attr("class","box_fav"); // $("#div_property").attr("class","detail_favorite"); $("#div_property"+id+" #bookmark_button").click(function () {_.users.delBookmarkList(id);}); } else alert("

Favoritos

Necesitas registrarte para poder agregar a Favoritos

¿ Olvidaste tu contraseña ?
Registrarse
"); }, "json"); }, delBookmarkList: function(id){ $.post("index.php/mode,json/control,Users.delBookmark", {id_property:id}, function(json) { if (json.status == 201) { $("#div_property"+id+" #bookmark_button").attr("onclick",""); $("#div_property"+id+" #bookmark_button").attr("title","Agregar a favoritos"); $("#div_property"+id+" #bookmark_button").unbind("click"); $("#div_property"+id).attr("class","box"); // $("#div_property").attr("class","detail"); $("#div_property"+id+" #bookmark_button").click(function () {_.users.addBookmarkList(id);}); } }, "json"); }, registry: function() { $.blockUI({ message: $('#registry'), css: { width: '400px', height: '330px' } }); $('#registry #btn_cancel').click(function(){ $('#registry #registry_error_msg').html(''); $.unblockUI(); }); $('#registry #btn_ok').click(function() { var correo = $('#registry #registry_email').val(); var clave = $('#registry #registry_password').val(); var nombre = $('#registry #registry_fistname').val(); var apellido = $('#registry #registry_lastname').val(); if(!correo.match(_.mail_regexp)) { $('#registry #registry_error_msg').html('Por favor ingrese una dirección de correo electronico válida'); return false; } if (clave == "") { $('#registry #registry_error_msg').html('Por favor ingresa una contraseña'); return false; } if (nombre == "") { $('#registry #registry_error_msg').html('Por favor ingresa tu nombre'); return false; } if (apellido == "") { $('#registry #registry_error_msg').html('Por favor ingresa tu apellido'); return false; } $('#registry #registry_error_msg').html('Procesando...'); $.post("index.php/mode,json/control,Users.register/", { email : correo, password : clave, firstname : nombre, lastname :apellido },function(json) { if (json.status == "201") { $.unblockUI(); _.alert("

Registro

Hemos enviado un correo con instrucciones para la activación de tu cuenta.

"); } else { var status_message = json.status_message.toLowerCase(); if (status_message.indexOf("mailer error") >= 0) { $('#registry #registry_error_msg').html('Error al enviar el correo, intente más tarde.'); } else if (status_message.indexOf("email registered") >= 0) { $('#registry #registry_error_msg').html('La cuenta de correo ya existe en el sistema, intenta con otra.'); } else { $('#registry #registry_error_msg').html('Error desconocido.'); } } }, "json"); }); }, complete: function(data) { $('#complete #address').val(data.address); $('#complete #zip').val(data.zip); $('#complete #office_lada').val(data.office_lada); $('#complete #office_phone').val(data.office_phone); $('#complete #extension').val(data.extension); $('#complete #cel_phone').val(data.cel_phone); $('#complete #nextel_id').val(data.nextel_id); $('#complete #website').val(data.website); if($('#complete #address').val()!="") $('#complete #address_field').css("display","none"); if($('#complete #zip').val()!="" && $('#complete #zip').val()!="0") $('#complete #zip_field').css("display","none"); if($('#complete #office_phone').val()!="") $('#complete #office_phone_field, #complete #extension_field').css("display","none"); if($('#complete #cel_phone').val()!="") $('#complete #cel_phone_field').css("display","none"); if($('#complete #nextel_id').val()!="") $('#complete #nextel_id_field').css("display","none"); if($('#complete #website').val()!="") $('#complete #website_field').css("display","none"); $.blockUI({ message: $('#complete'), css: { width: '370px', height: '340px' } }); $('#complete #btn_cancel').click(function(){ $('#complete #complete_error_msg').html(''); $.unblockUI(); location.href=RCN.url; }); $('#complete #btn_ok').click(function() { var address = $('#complete #address').val(); var zip = $('#complete #zip').val(); var office_lada = $('#complete #office_lada').val(); var office_phone = $('#complete #office_phone').val(); var cel_phone = $('#complete #cel_phone').val(); var extension = $('#complete #extension').val(); var nextel_id = $('#complete #nextel_id').val(); var website = $('#complete #website').val(); if (address == "") { $('#complete #complete_error_msg').html('Por favor ingresa una dirección'); return false; } if (zip == ""||zip == "0") { $('#complete #complete_error_msg').html('Por favor ingresa un Código Postal'); return false; } if (office_phone == "") { $('#complete #complete_error_msg').html('Por favor ingresa un número de teléfono'); return false; } $('#complete #complete_error_msg').html('Procesando...'); $.post("index.php/mode,json/control,Users.completeData/", { address : address, zip : zip, office_lada : office_lada, office_phone : office_phone, cel_phone : cel_phone, nextel_id : nextel_id, website : website },function(json) { if (json.status == "201") { $.unblockUI(); } else { var status_message = json.status_message.toLowerCase(); $('#registry #complete_error_msg').html('Error desconocido.'); } }, "json"); }); }, recover: function(){ $.blockUI({ message: $('#recover'), css: { width: '370px', height: '150px' } }); $('#recover #recover_cancel').click(function(){ $('#recover #recover_error_msg').html(''); $.unblockUI(); }); $('#recover #recover_ok').click(function() { if(!$("#recover #recover_email").val().match(_.mail_regexp)){ $('#recover #recover_error_msg').html('Por favor ingrese una dirección de correo electronico válida'); return false; } $('#recover #recover_error_msg').html('Procesando...'); $.post("index.php/mode,json/control,Users.recoverPassword/", { email: $('#recover #recover_email').val() }, function(json) { if (json.status === "201") { $.unblockUI(); _.alert("

Recuperación de Contraseña

Ha sido enviado un correo con las instrucciones para activar tu cuenta. Es posible que haya llegado al correo no deseado.

"); } else { var status_message = json.status_message.toLowerCase(); if (status_message.indexOf("mailer error") >= 0) { $('#recover #recover_error_msg').html('Error al enviar el correo, intente más tarde.'); } else if (status_message.indexOf("user not exists") >= 0) { $('#recover #recover_error_msg').html('La cuenta de correo no existe en el sistema.'); } else { $('#recover #recover_error_msg').html('Error desconocido.'); } } }, "json"); }); }, favorites_map: function(latitude, longitude) { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(longitude, latitude), 13); //map.setCenter(new GLatLng(latitude,longitude), 15); // map.addOverlay(new GMarker(new GLatLng(latitude,longitude))); map.addControl(new GSmallMapControl()); } }, addPointer: function(datos, advert, fav){ point=new GLatLng(datos.longitude,datos.latitude); var redIcon = new GIcon(G_DEFAULT_ICON); redIcon.image = RCN.url+"webroot/images/markerred.png"; var advertIcon = new GIcon(G_DEFAULT_ICON); advertIcon.image = "http://maps.google.com/mapfiles/kml/pal3/icon48.png"; advertIcon.iconSize=new GSize(32,32); var normalIcon = new GIcon(G_DEFAULT_ICON); normalIcon.image = RCN.url+"webroot/images/pin2.png"; normalIcon.iconSize=new GSize(34,34); var favIcon = new GIcon(G_DEFAULT_ICON); favIcon.image = "http://maps.google.com/mapfiles/kml/pal4/icon47.png"; favIcon.iconSize=new GSize(32,32); /* if(advert) marker= new GMarker(point,{ icon:advertIcon }); else if(fav) marker= new GMarker(point,{ icon:favIcon }); else marker= new GMarker(point,{ icon:redIcon }); alert(marker.getTitle()); map.addOverlay(marker); */ if(advert) datos.marker= new GMarker(point,{ icon:advertIcon }); else if(fav) datos.marker= new GMarker(point,{ icon:favIcon }); else datos.marker= new GMarker(point,{ icon:redIcon }); map.addOverlay(datos.marker); bounds=map.getBounds(); bounds.extend(point); map.setZoom(map.getBoundsZoomLevel(bounds)); map.setCenter(bounds.getCenter()); GEvent.addListener(datos.marker, "click", function() { _.users.openInfo(datos,advert,fav); //map.removeOverlay(datos.marker); console.log(advert); }); }, openInfo: function(datos,advert,fav){ advertise="PROPIEDAD DESTACADA
"; favorite="PROPIEDAD FAVORITA
"; if(!advert) advertise=""; if(!fav) favorite=""; if(fav&&advert) { advertise = ""; favorite = "PROPIEDAD DESTACADA Y FAVORITA
"; } var myHtml= favorite + advertise + "Tipo: "+datos.property_type+" en "+datos.contract_type+"
"; myHtml += "Colonia: "+datos.neighbourhood+"
"; myHtml += "Direccion: "+datos.address+" "+datos.ext_num; myHtml += (datos.int_num==0) ? "
" : " interior "+datos.int_num+"
"; myHtml += "Precio: $"+datos.price+" "+datos.currency.toUpperCase()+"
"; myHtml += "Recámara(s): "+datos.bedrooms+"
"; myHtml += "Baño(s): "+datos.badrooms+"Ver detalle"; map.openInfoWindowHtml(new GLatLng(datos.longitude,datos.latitude), myHtml); }, account: function() { $.getJSON("index.php/mode,json/control,Users.edit/", function(json) { $('#account #account_email').html(json.result.email); $('#account #account_password_hidden').val(json.result.password); $('#account #account_fistname').val(json.result.firstname); $('#account #account_lastname').val(json.result.lastname); $('#account #account_home_lada').val(json.result.office_lada); $('#account #account_home_phone').val(json.result.office_phone); $('#account #phone_extension').val(json.result.extension); $('#account #account_cel_phone').val(json.result.cel_phone); $('#account #account_address').val(json.result.address); $('#account #account_address2').val(json.result.neighbourhood); $('#account #account_zip').val(json.result.zip); $('#account #account_city').val(json.result.city); $('#account #account_state').val(json.result.state); $('#account #account_country').val(json.result.country); $('#account #account_nextel_id').val(json.result.nextel_id); $('#account #account_website').val(json.result.website); var properties=json.result.properties; $.blockUI({ message: $('#account'), css: { top: ($(window).height() - 350) /2 + 'px', left: ($(window).width() - 600) /2 + 'px', width: '600px' } }); $('#account #btn_cancel').click(function(){ $('#account #account_error_msg').html(''); $.unblockUI(); }); $('#account #btn_ok').click(function() { var clave = $('#account #account_password').val(); var nombre = $('#account #account_fistname').val(); var apellido = $('#account #account_lastname').val(); var office_lada = $('#account #account_home_lada').val(); var office_phone = $('#account #account_home_phone').val(); var direccion = $('#account #account_address').val(); var colonia = $('#account #account_address2').val(); var cp = $('#account #account_zip').val(); var ciudad = $('#account #account_city').val(); var estado = $('#account #account_state').val(); var pais = $('#account #account_country').val(); var extension = $('#account #phone_extension').val(); var celulartel = $('#account #account_cel_phone').val(); var nextel_id = $('#account #account_nextel_id').val(); var website = $('#account #account_website').val(); if (clave === "******" || clave === "") { clave = $('#account #account_password_hidden').val(); } if (nombre === "") { $('#account #account_error_msg').show(); $('#account #account_error_msg').html('Por favor ingresa tu nombre'); return false; } if (properties != "0" && office_phone.length <10) { $('#account #account_error_msg').show(); $('#account #account_error_msg').html('Por favor ingresa un teléfono valido'); return false; } $('#account #account_error_msg').html('Procesando...'); $.post("index.php/mode,json/control,Users.saveEdit/", { password : clave, firstname : nombre, lastname :apellido, address_line1 : direccion, address_line2 : colonia, zip : cp, city : ciudad, state : estado, country : pais, office_lada : office_lada, phone_office : office_phone, extension : extension, phone_cel : celulartel, nextel_id : nextel_id, website : website }, function(json) { if (json.status === "OK") { $.unblockUI(); _.alert("

Perfil de Usuario

Tu información ha sido actualizada

", function() { window.location.reload(); }); } else { $('#registry #registry_error_msg').html('Error desconocido.'); } }, "json"); }); }); } } }); /* search.js */ /** * @author elalecs * @version 2.1, March 2010 */ (function(F){ /** * @var F.s nombre corto para Frontend.search */ F.s = {}; F.s.params = { quiero: "rentar", ubicacion: "mapa", colonia: "", tipo: "depa", precio_min: 0, precio_max: -1, cuartos_min: 0, cuartos_max: -1, wc_min: 0, wc_max: -1, mts_min: 0, mts_max: -1, //lng: GeoInfo.Longitude, // Se obtiene de $control->run(GeoIP, getJS) //lat: GeoInfo.Latitude, // Se obtiene de $control->run(GeoIP, getJS) lat:20.659128, lng:-103.357864, lat_min: 0, lng_min: 0, lat_max: 0, lng_max: 0, moneda: "mx", by_key: false }; F.s.map = null; // Constructor $(function(){ cargarMapa(); porIDToggle(); porMapaToggle(); precio(); botonBuscar(); botonRebuscar(); }); function botonRebuscar() { $(".boton_rebuscar").click(function(){ if ($(this).attr("rel") == "closed") { $(this).text("Cancelar"); $(this).attr("rel", "opened"); $("#contenido_modificar_busqueda").css({ width: "980px", height: "auto" }); } else { $(this).text("Modificar Búsqueda"); $(this).attr("rel", "closed"); $("#contenido_modificar_busqueda").css({ width: "1px", height: "1px" }); } }); } function botonBuscar() { $("#buscar_btn").click(function() { F.s.params.tipo = ""; $("input[name='tipo']:checked").each(function(){ if (F.s.params.tipo !== "") { F.s.params.tipo += "+"; } F.s.params.tipo += $(this).val(); }); F.s.params.ubicacion = $("input[name='ubicacion']:checked").val(); if (F.s.params.ubicacion == 'colonia') { F.s.params.colonia = $('#colonia').val(); } F.s.params.quiero = $("input[name='quiero']:checked").val(); sw = F.s.map.getBounds().getSouthWest(); ne = F.s.map.getBounds().getNorthEast(); F.s.params.lat_sw = sw.lat(); F.s.params.lng_sw = sw.lng(); F.s.params.lat_ne = ne.lat(); F.s.params.lng_ne = ne.lng(); F.s.params.precio_min = ($('#precio_min').val()).replace(/\,/g, ''); F.s.params.precio_min = $.trim(F.s.params.precio_min); if (F.s.params.precio_min.length == 0) { F.s.params.precio_min = 0; } F.s.params.precio_max = ($('#precio_max').val()).replace(/\,/g, ''); F.s.params.precio_max = $.trim(F.s.params.precio_max); if (F.s.params.precio_max.length == 0) { F.s.params.precio_max = -1; } var property_key = $("#property_key").val(); property_key = property_key.replace(/(\.|\_|\-|\ )*/gi, ""); if (F.s.params.by_key) { if (property_key.length > 0) { location.href = RCN.url + property_key; } else { F.alert("Por favor ingrese un id"); } } else { $.post("index.php/mode,json/control,PropertiesSearch.saveParams", F.s.params, function(r){ location.href = "buscar/" + r.result; }, "json"); } }); } function cargarMapa() { $('#inicio_mapa, #bloqueo_mapa').css('height', $('div#inicio_pasos').height() - 2); F.s.map = new GMap2(document.getElementById("inicio_mapa")); F.s.map.setCenter(new GLatLng(F.s.params.lat, F.s.params.lng), 11); F.s.map.addControl(jQuery.extend({}, new GControl(), { initialize : function() { var estilos = { color : "#0000cc", backgroundColor : "white", font : "2em Arial", fontWeight : "bolder", border : "1px solid black", padding : "2px", marginBottom : "3px", textAlign : "center", cursor : "pointer" }; var container = $("
").append( // U:2191 UTF8:E28691 $("
").text('↑').css(estilos).click(function() { F.s.map.panDirection(0, 1); }), // U:2192 UTF8:E28692 $("
").text('→').css(estilos).click(function() { F.s.map.panDirection(-1, 0); }), // U:2190 UTF8:E28690 $("
").text('←').css(estilos).click(function() { F.s.map.panDirection(1, 0); }), // U:2193, UTF8:E28693 $("
").text('↓').css(estilos).click(function() { F.s.map.panDirection(0, -1); }), // Más $("
").text('+').css(estilos).click(function() { F.s.map.zoomIn(); }), // U:2014 UTF8:E28094 $("
").text('–').css(estilos).click(function() { F.s.map.zoomOut(); }) ).get(0); $(F.s.map.getContainer()).append(container); return container; }, getDefaultPosition : function() { return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7)); } })); $('#cambio_ciudad').show().click(function() { var val = $('option:selected', $(this)).val(); if (val == "gdl") { F.s.map.setCenter(new GLatLng(20.659128, -103.357864)); F.s.map.setZoom(11); } else if (val == 'chapala') { F.s.map.setCenter(new GLatLng(20.301163561540328, -103.22376251220703)); F.s.map.setZoom(13); } else if (val == 'vallarta') { F.s.map.setCenter(new GLatLng(20.653667405666592, -105.22687911987305)); F.s.map.setZoom(13); } }); } function porIDToggle() { $('input[name="quiero"]').click(function() { if ($('input[name="quiero"]:checked').val() == 'id') { F.s.params.by_key = true; $('#paso5 h1').text(2); $('#contexto_id').css('visibility', 'visible'); $('#paso2, #paso3, #paso4').slideUp(); $('#inicio_mapa, #cambio_ciudad').slideUp(); } else { F.s.params.by_key = false; $('#paso5 h1').text(5); $('#contexto_id').css('visibility', 'hidden'); $('#inicio_mapa, #cambio_ciudad').slideDown('slow'); $('#paso2, #paso3, #paso4').slideDown('slow'); } }); } function porMapaToggle() { $('input[name="ubicacion"]').click(function() { if ($('input[name="ubicacion"]:checked').val() == 'mapa') { $('#contexto_colonia, #colonia').hide(); $('#contexto_mapa').fadeIn(); $('#bloqueo_mapa').hide(); } else { $('#contexto_colonia').fadeIn(); $('#colonia').show(); $('#contexto_mapa').hide(); $('#bloqueo_mapa').show().css('opacity', 0.7); } }); } function precio() { var desde = 0; $('.btn_increment').click(function() { sumarPrecio(1, '#' + $(this).attr('rel')); }) $('.btn_decrement').click(function() { sumarPrecio(-1, '#' + $(this).attr('rel')); }) // solo números $('.cantidad').keydown(function(event) { var k = window.event ? window.event.keyCode : event.which; if (k == 9 || k == 8 || k == 46 || k == 37 || k == 39) return true; return /\d/.test(String.fromCharCode(k)); }).blur(function() { $(this).val(formateaCantidad(obtenerCantidad($(this).val()))); }); function sumarPrecio(sal, campo) { var bloque = 100; if ($('input[name="quiero"]:checked').val() == 'rentar') { bloque = 500; } else { bloque = 100000 } var cantidad = obtenerCantidad($(campo).val()); cantidad+= (sal * bloque); $(campo).val(formateaCantidad(cantidad)); } } function obtenerCantidad(cadena) { cadena = cadena.replace(/\,/g, ''); cadena = $.trim(cadena); return parseInt(cadena); } function formateaCantidad(cantidad) { var cadena = cantidad + ""; var largo = cadena.length; if (largo > 3 && largo <= 6) { cadena = cadena.substr(0, largo - 3) + "," + cadena.substr(largo - 3, 3); } else if (largo > 6 && largo <= 9) { cadena = cadena.substr(0, largo - 6) + "," + cadena.substr(largo - 6, 3) + "," + cadena.substr(largo - 3, 3); } else if (largo > 9 && largo <= 12) { cadena = cadena.substr(0, largo - 9) + "," + cadena.substr(largo - 9, 3) + "," + cadena.substr(largo - 6, 3) + "," + cadena.substr(largo - 3, 3); } return cadena; } F.s.skipFromSearch = function(datos, id_query, id_property, this_prop){ map.removeOverlay(datos.marker); $.post("index.php/mode,json/control,PropertiesSearch.skipFromSearch", { id_query: id_query, id_property: id_property }, function(json){ if (json.status == 201) { $("#" + this_prop).hide('slow'); } }, "json"); }; })(F);